<?php
/**
 * Created by PhpStorm
 * User: 龍zero
 * Date: 2022-04-21
 * Time: 10:24
 */

namespace App\Request\Book;


use Hyperf\Validation\Request\FormRequest;

class BookValidateRequest  extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'title' => 'required|max:50',
            'author' => 'required|max:50',
            'summary' => 'required|max:1000',
            'image' => 'required|max:100'
        ];
    }
}